<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <h:head>
        <title>MeteoCal</title>
        <link href="./css/application.css" rel="stylesheet"></link>
        <link rel="icon" type="image/ico" href="images/logoico.ico"/>
    </h:head>
    <h:body><div id="body">

            <div id="head">
                <a href="home.xhtml"><img src="images/logo.png" /></a>
            </div>

            <div id="title">
                <p1>MeteoCal</p1><br />
                <p2>Your website to plan your events.</p2>
            </div>

            <div id="description">
                <p>MeteoCal is a weather based calendar. Create events and invite your friends!<br />
                    In case of bad weather conditions MeteoCal will help you to choose<br /> the best day to reschedule it!<br />
                    Share your calendar and let all our community know your events!</p>
            </div>

            <div id="login"><center>

                    <h:form id="loginform">
                        <h:panelGrid columns="1">
                            <h:messages  errorStyle="font-weight: bold; color:red;" layout="table"/><br /> 
                            
                            <h:outputLabel for="username">Username
                                <p:inputText id="username" value="#{loginBean.username}" style="width:250px; float:right; margin-left:30px" />
                            </h:outputLabel>
                            <br />
                            <h:outputLabel for="password">Password
                                <p:password  id="password" value="#{loginBean.password}" style="width:250px;  float:right;" label="Password"/>
                            </h:outputLabel>

                        </h:panelGrid>
                        <br /><br />
                        <p:commandButton value="Login" action="#{loginBean.login()}" style="border:0; box-shadow:0px 2px 5px #000000;"
                                         ajax="true" update="@all" />
                        <p:button value="Registration" href="/registration.xhtml" style="border:0; box-shadow:0px 2px 5px #000000;" />

                         </h:form></center>
            </div>

        </div>      
    </h:body>
</html>

